package com.ruike.alisurface.ui.setting;

import android.view.View;

import com.ruike.alisurface.Constant;
import com.ruike.alisurface.R;
import com.ruike.alisurface.Serials.MsgEventBus;
import com.ruike.alisurface.base.BaseAty;
import com.ruike.alisurface.utils.ShareKey;
import com.voodoo.lib_utils.ShareUtils;

import butterknife.OnClick;

/**
 * Author: voodoo
 * CreateDate: 2020-04-17 017 上午 09:50
 * Description: 主图风格设置界面
 */
public class MainFigureStyleSettingActivity extends BaseAty {

    @Override
    protected int getLayoutResId() {
        return R.layout.activity_setting_main_fig_sty;
    }

    @Override
    protected void initViews() {
        initTitleBar(false);
    }

    @Override
    protected void initData() {

    }

    @OnClick({R.id.figStySetting_goback_imgv, R.id.figStySetting_pic_tv,
            R.id.figStySetting_video_tv, R.id.figStySetting_closeAdv_tv})
    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.figStySetting_goback_imgv:
                finish();
                break;
            case R.id.figStySetting_pic_tv: // 仅轮播图
                ShareUtils.getInstance().getInt(ShareKey.ADV_TYPE, Constant.ADV_TYPE_IMAGE);
                showRightTip(getResources().getString(R.string.setSuccessStr));
                break;
            case R.id.figStySetting_video_tv: // 仅轮广告
                ShareUtils.getInstance().getInt(ShareKey.ADV_TYPE, Constant.ADV_TYPE_VIDEO);
                showRightTip(getResources().getString(R.string.setSuccessStr));
                break;
            case R.id.figStySetting_closeAdv_tv: // 关闭广告
                ShareUtils.getInstance().getInt(ShareKey.ADV_TYPE, Constant.ADV_TYPE_IMAGE);
                showRightTip(getResources().getString(R.string.setSuccessStr));
                break;
        }
    }

    @Override
    public void doEventBusResult(MsgEventBus event) {

    }
}
